<template>
	<view class="classLayout pageBg">
		<custom-nav-bar title="分类"></custom-nav-bar>
		<view class="classify">
			<theme-item v-for="item in ClassifyList" :item='item' :key="item._id"></theme-item>
		</view>
		
	</view>
</template>

<script setup>
import { ref } from 'vue';
import {apiGetClassify} from '@/api/apis.js'
import {onShareAppMessage,onShareTimeline} from "@dcloudio/uni-app"
const ClassifyList = ref([])
//获取分类页面
const GetClassify = async ()=>{
	let {data} = await apiGetClassify({
		pageSize:15
	})
	ClassifyList.value = data
	console.log(data);
}
//分享给好友
onShareAppMessage((e)=>{
	return {
		title:"好看的壁纸，精选分类",
		path:"/pages/classify/classify"
	}
})

//分享朋友圈
onShareTimeline(()=>{
	return {
		title:"好看的壁纸，精选分类"
	}
})

GetClassify()


</script>

<style lang="scss" scoped>
.classify{
	padding:30rpx;
	display: grid;
	grid-template-columns: repeat(3,1fr);
	gap:15rpx;
}
</style>
